<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../comum/CabecalhoTaglibComum.jsp"%>
<%@ taglib uri="http://sourceforge.net/projects/jsf-comp" prefix="chart" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PAQS | Programa de Avaliação de Qualidade de Software</title>
<style>
<jsp:include page="../comum/geral.css"/>
</style> 
</head>
<f:view>
<body>
	<h:form id="projetoForm">
<%@include file="../comum/CabecalhoComum.jsp"%>
<%@include file="../comum/CabecalhoUsuarioComum.jsp"%>
<div class="corpo">
<%@include file="../comum/Mensagem.jsp"%>
<div class="caminho">
		<h:outputText value="Onde você está: "></h:outputText>
		<h:commandLink value="Lista de Projetos" action="#{pc_GraficoView.voltarProjetoEdit}"></h:commandLink>
		<h:outputText value=" >> "/>
		<h:commandLink value="Projeto #{pc_GraficoView.projeto.nome}" action="#{pc_GraficoView.voltarProjetoEdit}"></h:commandLink>
		<h:outputText value=" >> "></h:outputText>
		<h:commandLink value="Iterações" action="#{pc_GraficoView.voltarListIteracao}"></h:commandLink>
		<h:outputText value=" >> "></h:outputText>
		<h:commandLink value="#{pc_GraficoView.iterNumero}ª iteracao" action="#{pc_GraficoView.voltarIteracaoEdit}"/>
		<h:outputText value=" >> "></h:outputText>
		<h:commandLink value="#{pc_GraficoView.nomeQualidade}" action="#{pc_GraficoView.voltarQualidadeSelect}"/>
		<h:outputText value=" >> "></h:outputText>
		<h:commandLink value="Característica" action="#{pc_MetricaEdit.voltarCaracteristicaEdit}"/>
		<h:outputText value=" >> "></h:outputText>
		<h:commandLink value="Subcaracterística" action="#{pc_MetricaEdit.voltarSubcaracteristicaEdit}"/>
		<h:outputText value=" >> "></h:outputText>
		<h:outputText value="Gráfico"></h:outputText>
</div>
<h:selectOneMenu value="#{pc_GraficoView.graficoPor}">
	<f:selectItems value="#{pc_GraficoView.selecionarTipoGrafico}"/>
</h:selectOneMenu>
<h:commandButton value="Selecionar" action="#{pc_GraficoView.recarregarGrafico}"/>
<br>
<h:dataTable value="#{pc_GraficoView.listDataSet}" var="dataSet">
	<h:column>
		<chart:chart datasource="#{dataSet}" type="bar" is3d="true"></chart:chart>
	</h:column>
</h:dataTable>
<br>
<h:outputText value="Iteração #{pc_GraficoView.iterNumero}, Pontuação Esperada: "></h:outputText>
<h:outputText value="#{pc_GraficoView.iteracao.pontuacaoEsperada}"></h:outputText>
<h:outputText value=", Pontuação Obtida: #{pc_GraficoView.notaIteracao}"></h:outputText>
<h:dataTable value="#{pc_GraficoView.listaCaracteristicas}" var="caracteristica" columnClasses="dataTableHeader">
	<h:column>
		<h:outputText value="Característica: #{caracteristica.nome}, Pontuação Esperada: #{caracteristica.pontuacaoEsperada}, Pontuação Obtida: #{caracteristica.nota}"></h:outputText>
		<h:dataTable value="#{caracteristica.subcaracteristicas}" var="subcaracteristica" columnClasses="dataTableBody">
			<h:column>
				<h:outputText value="Subcaracterística: #{subcaracteristica.nome}, Pontuação Esperada: #{subcaracteristica.pontuacaoEsperada}, Pontuação Obtida: #{subcaracteristica.nota} }"></h:outputText>
				<h:dataTable value="#{subcaracteristica.metricas}" var="metrica" columnClasses="dataTableHeader">
					<h:column>
						<h:outputText value="Métrica: #{metrica.nome}, Nota: #{metrica.nota}"></h:outputText>
					</h:column>
				</h:dataTable>
			</h:column>
		</h:dataTable>
	</h:column>
</h:dataTable>
</div>
<%@include file="../comum/RodapeComum.jsp"%>
</h:form>
</body>
</f:view>
</html>